<template>
  <div class="collect">
    <project-nav-bar></project-nav-bar>
    <div class="titles">
      <h2>我的收藏</h2>
    </div>
    <goods-list :goodsList="goodsList"></goods-list>
    
  </div>
</template>

<script>
import ProjectNavBar from './children/ProjectNavBar'
import GoodsList from './children/GoodsList'
import {getListAction} from '@/network/collect'
export default {
  components: {
    ProjectNavBar,
    GoodsList
  },
  created() {
    this.getListActions()
  },
  data() {
    return {
      goodsList: [],
    }
  },
  methods: {
    getListActions() {
      getListAction({
        openId: localStorage.getItem('openId')
      }).then(res => {
        console.log(res)
        this.goodsList = res.collectGoodsList
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.collect {
  background-color: #f4f4f4;
}
.titles {
  text-align: center;
  margin-top: 44px;
  padding: 10px 0;
}
</style>